package com.jmp.base;

import com.jmp.base.dto.*;
import one.stand.model.ResultModel;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

public interface WechatApi {

    @PostMapping("/wechat/token")
    ResultModel<WechatTokenResponse> token(@RequestBody WechatTokenRequest request);

    @PostMapping("/wechat/ticket")
    ResultModel<WechatTokenResponse> ticket(@RequestBody WechatTokenRequest request);

    /**
     * 客服消息
     */
    @PostMapping("/wechat/send/msg")
    ResultModel<WechatSendMsgResponse> sendMsg(@RequestBody WechatSendMsgRequest request);

    @PostMapping("/wechat/template/init")
    ResultModel templateInit(@RequestBody WechatTemplateInitRequest request);

    //开放平台

    /**
     * 获取第三方token
     */
    @PostMapping("/wechat/component/token")
    ResultModel<WechatComponentTokenResponse> componentToken();

    /**
     * 刷新授权方token
     */
    @PostMapping("/wechat/authorizer/token")
    ResultModel<WechatAuthorizerTokenResponse> authorizerToken(@RequestBody WechatAuthorizerTokenRequest request);
}
